﻿using System.Web.Mvc;
using TeamCommunitySolution.Domain.DataLayer.Base;
using TeamCommunitySolution.Modules.Base.Requests;

namespace TeamCommunitySolution.Controllers
{
    public class MasterController : Controller
    {
        protected SystemUser _currentUser = null;

        public MasterController()
        {
            if (this.User == null)
                return;

            if (_currentUser == null)
            {
                SystemUserRequest request = new SystemUserRequest();
                request.Username = this.User.Identity.Name;

                this._currentUser = MvcApplication.BaseService.GetSystemUserByUsername(request).SystemUser;
            }
        }
    }
}
